import request from '@/utils/request';

const prefix = '/apharbor'

const iam_prefix = '/iam'
export async function createNameSpace(data) {
  return request(`${prefix}/api/v1/images/namespace`, {
    method: 'POST',
    data: data,
  });
}


export async function getNameSpaceList(data) {
    return request(`${prefix}/api/v1/images/namespace`, {
      method: 'GET',
      params: data,
    });
  }
  

export async function deleteNameSpace(id) {
    return request(`${prefix}/api/v1/images/namespace/${id}`, {
      method: 'DELETE',
    });
}

export async function getNameSpaceDetail(id) {
    return request(`${prefix}/api/v1/images/namespace/${id}`, {
      method: 'GET',
    });
}

export async function getGroupList(data) {
  return request(`${iam_prefix}/api/v1/users/current/groups`, {
    method: 'GET',
    params: data,
  });
}


